const FileManagerPlugin = require("filemanager-webpack-plugin");
module.exports = {
  // 基本路径
  publicPath: "/treasure/",
  // 输出文件目录
  outputDir: "treasure",
  devServer: {
    proxy: {
      "/bomc": {
        target: "http://admin.devch.qiaofangcloud.cn",
        // target: "http://localhost:8180",
        changeOrigin: true,
        pathRewrite: {
          "^/bomc": "/bomc"
        }
      }
    }
  },
  configureWebpack: {
    plugins: [
      new FileManagerPlugin({
        onEnd: {
          delete: ["./treasure.zip"],
          archive: [{ source: "./treasure", destination: "./treasure.zip" }]
        }
      })
    ]
  }
};
